using StudentManagement.Application.DTOs;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace StudentManagement.Application.Services
{
    public interface IUserService
    {
        Task<UserDTO> GetUserByIdAsync(int id);
        Task<UserDTO> GetUserByUsernameAsync(string username);
        Task<UserDTO> GetUserByEmailAsync(string email);
        Task<IEnumerable<UserDTO>> GetAllUsersAsync();
        Task<IEnumerable<UserDTO>> GetUsersByRoleIdAsync(int roleId);
        Task<UserDTO> CreateUserAsync(UserDTO userDTO);
        Task<UserDTO> UpdateUserAsync(int id, UserDTO userDTO);
        Task<bool> DeleteUserAsync(int id);
        Task<IEnumerable<UserDTO>> SearchUsersAsync(string keyword);
        Task<bool> UsernameExistsAsync(string username);
        Task<bool> EmailExistsAsync(string email);
        Task<UserDTO> LoginAsync(LoginDTO loginDTO);
        Task<UserDTO> RegisterAsync(RegisterDTO registerDTO);
        Task<(bool isValid, int userId, string username, List<string> roles)> ValidateUserAsync(string username, string password);
        Task<List<string>> GetUserRolesAsync(int userId);
    }
}